package date;import java.text.SimpleDateFormat;import java.time.LocalDateTime;import java.time.LocalTime;import java.time.format.DateTimeFormatter;import java.util.Date;public class DateUtils {    private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";    public static final String timestampFormat(long timestamp){        Date date = new Date(timestamp);        return new SimpleDateFormat(DATE_FORMAT).format(date);    }    public static final String now(){        return new SimpleDateFormat(DATE_FORMAT).format(new Date());    }    public static final String Java8Now(){        LocalDateTime now = LocalDateTime.now();        DateTimeFormatter pattern = DateTimeFormatter.ofPattern(DATE_FORMAT);        return now.format(pattern);    }    public static void main(String[] args) {//        System.out.println(Java8Now());//        System.out.println(now());        System.out.println(LocalDateTime.now());    }}